﻿@{
    ViewBag.Title = "入库单列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.nbGridFor<MaterialPurchase>(s =>
 {
     s.Action("List");
     s.Columns(c =>
     {
         c.Bind(e => e.Id).IsKey();
         c.BindDateTime(e => e.OrderDate).AsSearch();
         c.Bind(e => e.SupplierName).Align(GridAlign.Left).AsQuery().AsSearch();
         c.Bind(e => e.TotalPrice).Width(60).Align(GridAlign.Right);
         c.Bind(e => e.ItemDesc).Width("auto").Align(GridAlign.Left).AsQuery().AsSearch();
         c.BindEnum(e => e.OrderState, "PurchaseState").AsSearch();
         c.Bind(e => e.UpdateUser).Width(60);
         c.BindDateTime(e => e.UpdateDate);
         c.BindTemplate(60)
            .Template(@<a href="@Url.OpenDialog(Url.Action("Edit", new { Id = "${Id}" }), "原材料入库（${SupplierName}）")" class="imgbtn2" ><span
                class="accept">入库</span></a>);
     });
 }))
